package business {
	import assets.GraphicResources;

	public class Currency {
		[Bindable]
		public var rate:Number;

		[Bindable]
		public var code:String;

		[Bindable]
		public var name:String;

		[Bindable]
		public var icon:Class;

		public function toString():String {
			return code != null ? code : super.toString();
		}

		public function Currency(code:String, name:String, rate:Number) {
			this.rate = rate;
			this.code = code;
			this.name = name;
			this.icon = GraphicResources.getIconFromCurrencyCode(code);
//			trace("Created Currency: " + currencyCode + " with rate: " + rate);
		}
	}
}